<table width="100%" border="0">
                	<tr style="background:#201C1D;color:#FFF;font-size:14px;"><td><b>Categories</b></td></tr>
                     <?php 					 
					$sql = mysql_query("select * from subcategories order by rand() limit 0,9 ");			
					if(mysql_num_rows($sql) >0){							
								while($row= mysql_fetch_array($sql))
								{  extract($row);
						?>
					<tr><td><a href="subproducts.php?sub_id=<?php echo $sub_id; ?>&cat_id=<?php echo $cat_id; ?>"><?php echo $subcat; ?></a></td></tr>     
					<?php
					}
					}
					?>	
               </table>